package com.wm.blog_admin.event;

import com.wm.blog_common.domain.TIconDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * @author wm_yu
 * @date 2020-4-29 12:46
 */
@Component
public class IconEventPublisher {

    @Autowired
    private ApplicationContext applicationContext;

    @Async
    public void publish(TIconDO iconDO) {
        applicationContext.publishEvent(new IconEvent(this,iconDO));
    }
}
